package com.zr.eim.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zr.eim.mapper.EimHomeInformationMapper;
import com.zr.eim.domain.EimHomeInformation;
import com.zr.eim.service.IEimHomeInformationService;

import javax.annotation.Resource;

/**
 * 居家检测Service业务层处理
 * 
 * @author zhaojunqi
 * @date 2022-10-21
 */
@Service
public class EimHomeInformationServiceImpl implements IEimHomeInformationService 
{
    @Resource
    private EimHomeInformationMapper eimHomeInformationMapper;

    /**
     * 查询居家检测
     * 
     * @param id 居家检测主键
     * @return 居家检测
     */
    @Override
    public EimHomeInformation selectEimHomeInformationById(Long id)
    {
        return eimHomeInformationMapper.selectEimHomeInformationById(id);
    }

    /**
     * 查询居家检测列表
     * 
     * @param eimHomeInformation 居家检测
     * @return 居家检测
     */
    @Override
    public List<EimHomeInformation> selectEimHomeInformationList(EimHomeInformation eimHomeInformation)
    {
        return eimHomeInformationMapper.selectEimHomeInformationList(eimHomeInformation);
    }

    /**
     * 新增居家检测
     * 
     * @param eimHomeInformation 居家检测
     * @return 结果
     */
    @Override
    public int insertEimHomeInformation(EimHomeInformation eimHomeInformation)
    {
        return eimHomeInformationMapper.insertEimHomeInformation(eimHomeInformation);
    }

    /**
     * 修改居家检测
     * 
     * @param eimHomeInformation 居家检测
     * @return 结果
     */
    @Override
    public int updateEimHomeInformation(EimHomeInformation eimHomeInformation)
    {
        return eimHomeInformationMapper.updateEimHomeInformation(eimHomeInformation);
    }

    /**
     * 批量删除居家检测
     * 
     * @param ids 需要删除的居家检测主键
     * @return 结果
     */
    @Override
    public int deleteEimHomeInformationByIds(Long[] ids)
    {
        return eimHomeInformationMapper.deleteEimHomeInformationByIds(ids);
    }

    /**
     * 删除居家检测信息
     * 
     * @param id 居家检测主键
     * @return 结果
     */
    @Override
    public int deleteEimHomeInformationById(Long id)
    {
        return eimHomeInformationMapper.deleteEimHomeInformationById(id);
    }

/**
     * 定时查询居家监测居民信息表
     * @return 居家监测居民信息表
     */
    @Override
    public List<EimHomeInformation> selectEimTaskList() {
        return eimHomeInformationMapper.selectEimTaskList();
    }

/**
     * 定时查询居家监测居民信息表,解除居家监测到期的居民的监测状态
     * @return 解除居家监测的人数
     */
    @Override
    public int removeMonitorList() {
        return eimHomeInformationMapper.removeMonitorList();
    }
}
